import 'package:flutter/material.dart';

class MyApp9 extends StatelessWidget {
  const MyApp9({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      // 导航条
      appBar: AppBar(
        title: const Text('Row组件',
            style: TextStyle(color: Colors.white, fontSize: 20)),
        backgroundColor: Colors.pink,
        centerTitle: true,
      ),
      // 主体区域
      body: Container(
          margin: const EdgeInsets.only(top: 50),
          width: MediaQuery.of(context).size.width,
          height: 120,
          color: Colors.cyan,
          child: Row(
            // 主轴的对齐方式
            mainAxisAlignment: MainAxisAlignment.spaceAround,
            // 侧轴的对齐方式
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Image.network('https://yanxuan-item.nosdn.127.net/afd6199278a5b8fd783bc4947960fabc.jpg', width: 86,),
              const Expanded(
                flex: 1,
                child:  Text(
                  '茶水分离杯耐热隔热玻璃杯, 茶水分离杯耐热隔热玻璃杯, 茶水分离杯耐热隔热玻璃杯, 43434343, 隔热玻璃杯, 43434343',
                  style: TextStyle(fontSize: 20), maxLines: 3, overflow: TextOverflow.ellipsis,
                ),
              ),
              const Icon(Icons.add)
            ],
          ),
        )
    );
  }
}